TYPE_SAFE_ARITHMETIC_UB - Controls whether ts::arithmetic_policy_default is ts::undefined_behavior_arithmetic or ts::default_arithmetic.
TYPE_SAFE_ENABLE_ASSERTIONS - Controls whether internal assertions are enabled.
TYPE_SAFE_ENABLE_PRECONDITION_CHECKS - Controls whether preconditions are checked.
TYPE_SAFE_ENABLE_WRAPPER - Controls whether the typedefs in types.hpp use the type safe wrapper types.
operator|(const Enum &, const Enum &) - Creates a ts::flag_combo from two enums.
operator~(const Enum &) - Creates a ts::flag_mask for the single enum value.
type_safe
constrain(T &&, Constraint) - Creates a ts::constrained_type with the default verifier, ts::assertion_verifier.
constrain(T &&, Constraint) - Creates a ts::constrained_type.
constrained_type<T&, Constraint, Verifier> - Specialization of ts::constrained_type for references.
advance(type_safe::index_t &, const type_safe::difference_t &)
arithmetic_policy_default - The default ArithmeticPolicy
.
array_ref - A reference to an array of objects of type T
.
array_xvalue_ref - Convenience alias for ts::array_ref where XValue
is true
.
assertion_verifier - A Verifier
for ts::constrained_type that DEBUG_ASSERT
s the constraint.
basic_optional - An optional type, i.e. a type that may or may not be there.
basic_variant - An improved union
storing at most one of the given types at a time (or possibly none).
boolean - A type safe boolean class.
bounded_type - An alias for ts::constrained_type that uses ts::constraints::bounded as its Constraint
. \notes This is some type where the values must be in a certain interval.
checked_arithmetic - An ArithmeticPolicy
where under/overflow throws an exception.
clamp(const constraints::closed_interval<T, LowerBound, UpperBound> &, U &&) - Returns a copy of val
so that it is in the given ts::constraints::closed_interval.
clamped_type - An alias for ts::constrained_type that uses ts::constraints::closed_interval as its Constraint
and ts::clamping_verifier as its Verifier
. \notes This is some type where the values are always clamped so that they are in a certain interval.
clamping_verifier - A Verifier
for ts::constrained_type that clamps the value to make it valid.
combo(const flag_mask<Enum> &) - Converts a flag mask to a flag combination.
combo(const flag_set<Enum> &) - Converts a ts::flag_set to a flag combination.
compact_bool_policy - A CompactPolicy
for ts::compact_optional_storage for boolean types.
compact_container_policy - A CompactPolicy
for ts::compact_optional_storage for container types.
compact_enum_policy - A CompactPolicy
for ts::compact_optional_storage for enumeration types.
compact_floating_point_policy - A CompactPolicy
for ts::compact_optional_storage for floating point types.
compact_integer_policy - A CompactPolicy
for ts::compact_optional_storage for integer types.
compact_optional - An alias for ts::basic_optional using ts::compact_optional_storage with the given CompactPolicy
. \module optional
compact_optional_storage - A StoragePolicy
for ts::basic_optional that is more space efficient than ts::direct_optional_storage.
constrain_error - The exception class thrown by the ts::throwing_verifier.
constrained_modifier - A proxy class to provide write access to the stored value of a ts::constrained_type.
constrained_ref - Alias for ts::constrained_type<T&>.
constrained_type - A value of type T
that always fulfills the predicate Constraint
.
copy(tagged_union<Types...> &, const tagged_union<Types...> &)
cref(const T &) - Creates a (const) ts::object_ref.
cref(const T (&)[Size]) - Creates a ts::array_ref to const
.
cref(const T *, const T *) - Creates a ts::array_ref to const
.
cref(const T *, size_t) - Creates a ts::array_ref to const
.
default_arithmetic - An ArithmeticPolicy
that behaves like the default integer implementations: Signed under/overflow is UB, unsigned under/overflow wraps around.
deferred_construction - A tiny wrapper to create an object without constructing it yet.
derived_type - Tag type to specify the derived type of a ts::downcast.
difference_t - A type modelling the difference between two ts::index_t objects.
direct_optional_storage - A StoragePolicy
for ts::basic_optional that is similar to std::optional<T>'s implementation.
distance(const type_safe::index_t &, const type_safe::index_t &)
downcast(Base &) - Casts an object of base class type to the derived class type.
downcast(derived_type<Derived>, Base &) - Casts an object of base class type to the derived class type.
downcast(derived_type<Derived>, const Base &) - Casts an object of base class type to the derived class type.
equal_to - Comparison functors similar to the std::
version, but explicitly cast the result of the comparison to bool
.
fallback_variant - A ts::basic_variant using the ts::fallback_variant_policy.
fallback_variant_policy - A variant policy for ts::basic_variant that uses a fallback type.
flag - A type safe flag, it can either be true
or false
.
flag_combo - Represents a combination of multiple flags.
flag_mask - Represents a mask of flags.
flag_set - A set of flags where each one can either be 0
or 1
.
flag_set_traits - Traits for the enum used in a ts::flag_set.
floating_point - A type safe floating point class.
function_ref<Return(Args...)> - A reference to a function.
get(const strong_typedef<Tag, T> &&) - Accesses the underlying value.
get(const strong_typedef<Tag, T> &) - Accesses the underlying value.
get(strong_typedef<Tag, T> &&) - Accesses the underlying value.
get(strong_typedef<Tag, T> &) - Accesses the underlying value.
greater - Comparison functors similar to the std::
version, but explicitly cast the result of the comparison to bool
.
greater_equal - Comparison functors similar to the std::
version, but explicitly cast the result of the comparison to bool
.
hashable - Inherit from it in the std::hash<StrongTypedef>
specialization to make it hashable like the underlying type. See example/strong_typedef.cpp.
index_t - A type modelling an index into an array.
integer - A type safe integer class.
less - Comparison functors similar to the std::
version, but explicitly cast the result of the comparison to bool
.
less_equal - Comparison functors similar to the std::
version, but explicitly cast the result of the comparison to bool
.
make_bounded(T &&, U1 &&, U2 &&) - Creates a ts::bounded_type to a specified ts::constraints::closed_interval.
make_bounded_exclusive(T &&, U1 &&, U2 &&) - Creates a ts::bounded_type to a specified ts::constraints::open_interval.
make_clamped(T &&, U1 &&, U2 &&) - Creates a ts::clamped_type from the specified ts::constraints::closed_interval.
mask(const Enum &) - Converts a flag combination to a flag mask.
mask(const flag_combo<Enum> &) - Converts a flag combination to a flag mask.
mask(const flag_set<Enum> &) - Converts a ts::flag_set to a flag mask.
never_empty_variant_policy - A variant policy for ts::basic_variant that creates a variant which is never empty.
next(const type_safe::index_t &, const type_safe::difference_t &)
noflag - Tag object of type ts::noflag_t.
noflag_t - Tag type to mark a ts::flag_set without any flags set.
not_equal_to - Comparison functors similar to the std::
version, but explicitly cast the result of the comparison to bool
.
null_verifier - A Verifier
for ts::constrained_type that doesn't check the constraint.
nullopt - Tag object of type ts::nullopt_t.
nullopt_t - Tag type to mark a ts::basic_optional without a value.
nullvar - Tag object of type ts::nullvar_t.
nullvar_t - Tag type to mark a ts::basic_variant without a value.
object_ref - A reference to an object of some type T
.
operator!=(T, const type_safe::boolean &) - ts::boolean in-equality comparison.
operator!=(T, type_safe::flag) - ts::flag in-equality comparison.
operator!=(const FlagCombo &, const flag_set<Enum> &) - flag_set
equality comparison.
operator!=(const T &, const basic_variant<VariantPolicy, Head, Types...> &)
operator!=(const T &, const object_ref<U, XValue> &) - Comparison operator for ts::object_ref.
operator!=(const U &, const basic_optional<StoragePolicy> &) - Compares a ts::basic_optional with a value.
operator!=(const basic_optional<StoragePolicy> &, const U &) - Compares a ts::basic_optional with a value.
operator!=(const basic_optional<StoragePolicy> &, const basic_optional<StoragePolicy> &) - Compares two ts::basic_optional objects.
operator!=(const basic_optional<StoragePolicy> &, type_safe::nullopt_t)
operator!=(const basic_variant<VariantPolicy, Head, Types...> &, const T &)
operator!=(const basic_variant<VariantPolicy, Head, Types...> &, type_safe::nullvar_t)
operator!=(const constrained_type<T, Constraint, Verifier> &, const constrained_type<T, Constraint, Verifier> &) - Compares a ts::constrained_type.
operator!=(const flag_set<Enum> &, const FlagCombo &) - flag_set
equality comparison.
operator!=(const flag_set<Enum> &, const flag_set<Enum> &) - flag_set
equality comparison.
operator!=(const flag_set<Enum> &, type_safe::noflag_t) - flag_set
equality comparison.
operator!=(const integer<A, Policy> &, const integer<B, Policy> &)
operator!=(const object_ref<T, XValue> &, U &) - Comparison operator for ts::object_ref.
operator!=(const object_ref<T, XValue> &, const object_ref<U, XValue> &) - Comparison operator for ts::object_ref.
operator!=(const type_safe::boolean &, T) - ts::boolean in-equality comparison.
operator!=(const type_safe::boolean &, const type_safe::boolean &) - ts::boolean in-equality comparison.
operator!=(type_safe::flag, T) - ts::flag in-equality comparison.
operator!=(type_safe::flag, type_safe::flag) - ts::flag in-equality comparison.
operator!=(type_safe::noflag_t, const flag_set<Enum> &) - flag_set
equality comparison.
operator!=(type_safe::nullopt_t, const basic_optional<StoragePolicy> &)
operator!=(type_safe::nullvar_t, const basic_variant<VariantPolicy, Head, Types...> &)
operator%(const integer<A, Policy> &, const integer<B, Policy> &)
operator&(const FlagCombo &, const flag_set<Enum> &) - Checks whether a combination of flags is set in a
.
operator&(const flag_set<Enum> &, const FlagCombo &) - Checks whether a combination of flags is set in a
.
operator*(const floating_point<A> &, const floating_point<B> &)
operator*(const integer<A, Policy> &, const integer<B, Policy> &)
operator+(const floating_point<A> &, const floating_point<B> &)
operator+(const integer<A, Policy> &, const integer<B, Policy> &)
operator+(const type_safe::difference_t &, const type_safe::index_t &)
operator+(const type_safe::index_t &, const type_safe::difference_t &)
operator-(const floating_point<A> &, const floating_point<B> &)
operator-(const integer<A, Policy> &, const integer<B, Policy> &)
operator-(const type_safe::index_t &, const type_safe::difference_t &)
operator-(const type_safe::index_t &, const type_safe::index_t &)
operator/(const floating_point<A> &, const floating_point<B> &)
operator/(const integer<A, Policy> &, const integer<B, Policy> &)
operator<(const T &, const basic_variant<VariantPolicy, Head, Types...> &)
operator<(const U &, const basic_optional<StoragePolicy> &) - Compares a ts::basic_optional with a value.
operator<(const basic_optional<StoragePolicy> &, const U &) - Compares a ts::basic_optional with a value.
operator<(const basic_optional<StoragePolicy> &, const basic_optional<StoragePolicy> &) - Compares two ts::basic_optional objects.
operator<(const basic_optional<StoragePolicy> &, type_safe::nullopt_t)
operator<(const basic_variant<VariantPolicy, Head, Types...> &, const T &)
operator<(const basic_variant<VariantPolicy, Head, Types...> &, type_safe::nullvar_t)
operator<(const constrained_type<T, Constraint, Verifier> &, const constrained_type<T, Constraint, Verifier> &) - Compares a ts::constrained_type.
operator<(const floating_point<A> &, const floating_point<B> &)
operator<(const integer<A, Policy> &, const integer<B, Policy> &)
operator<(type_safe::nullopt_t, const basic_optional<StoragePolicy> &)
operator<(type_safe::nullvar_t, const basic_variant<VariantPolicy, Head, Types...> &)
operator<<(std::basic_ostream<Char, CharTraits> &, const floating_point<FloatT> &)
operator<<(std::basic_ostream<Char, CharTraits> &, const integer<IntegerT, Policy> &)
operator<<(std::basic_ostream<Char, CharTraits> &, const type_safe::boolean &) - ts::boolean output operator.
operator<=(const T &, const basic_variant<VariantPolicy, Head, Types...> &)
operator<=(const U &, const basic_optional<StoragePolicy> &) - Compares a ts::basic_optional with a value.
operator<=(const basic_optional<StoragePolicy> &, const U &) - Compares a ts::basic_optional with a value.
operator<=(const basic_optional<StoragePolicy> &, const basic_optional<StoragePolicy> &) - Compares two ts::basic_optional objects.
operator<=(const basic_optional<StoragePolicy> &, type_safe::nullopt_t)
operator<=(const basic_variant<VariantPolicy, Head, Types...> &, const T &)
operator<=(const basic_variant<VariantPolicy, Head, Types...> &, type_safe::nullvar_t)
operator<=(const constrained_type<T, Constraint, Verifier> &, const constrained_type<T, Constraint, Verifier> &) - Compares a ts::constrained_type.
operator<=(const floating_point<A> &, const floating_point<B> &)
operator<=(const integer<A, Policy> &, const integer<B, Policy> &)
operator<=(type_safe::nullopt_t, const basic_optional<StoragePolicy> &)
operator<=(type_safe::nullvar_t, const basic_variant<VariantPolicy, Head, Types...> &)
operator==(T, const type_safe::boolean &) - ts::boolean equality comparison.
operator==(T, type_safe::flag) - ts::flag equality comparison.
operator==(const FlagCombo &, const flag_set<Enum> &) - flag_set
equality comparison.
operator==(const T &, const basic_variant<VariantPolicy, Head, Types...> &)
operator==(const T &, const object_ref<U, XValue> &) - Comparison operator for ts::object_ref.
operator==(const U &, const basic_optional<StoragePolicy> &) - Compares a ts::basic_optional with a value.
operator==(const basic_optional<StoragePolicy> &, const U &) - Compares a ts::basic_optional with a value.
operator==(const basic_optional<StoragePolicy> &, const basic_optional<StoragePolicy> &) - Compares two ts::basic_optional objects.
operator==(const basic_optional<StoragePolicy> &, type_safe::nullopt_t) - Comparison of ts::basic_optional with ts::nullopt.
operator==(const basic_variant<VariantPolicy, Head, Types...> &, const T &) - Compares a ts::basic_variant with a value.
operator==(const basic_variant<VariantPolicy, Head, Types...> &, const basic_variant<VariantPolicy, Head, Types...> &) - Compares two ts::basic_variants.
operator==(const basic_variant<VariantPolicy, Head, Types...> &, type_safe::nullvar_t) - Compares a ts::basic_variant with ts::nullvar.
operator==(const constrained_type<T, Constraint, Verifier> &, const constrained_type<T, Constraint, Verifier> &) - Compares a ts::constrained_type.
operator==(const flag_set<Enum> &, const FlagCombo &) - flag_set
equality comparison.
operator==(const flag_set<Enum> &, const flag_set<Enum> &) - flag_set
equality comparison.
operator==(const flag_set<Enum> &, type_safe::noflag_t) - flag_set
equality comparison.
operator==(const integer<A, Policy> &, const integer<B, Policy> &)
operator==(const object_ref<T, XValue> &, U &) - Comparison operator for ts::object_ref.
operator==(const object_ref<T, XValue> &, const object_ref<U, XValue> &) - Comparison operator for ts::object_ref.
operator==(const type_safe::boolean &, T) - ts::boolean equality comparison.
operator==(const type_safe::boolean &, const type_safe::boolean &) - ts::boolean equality comparison.
operator==(type_safe::flag, T) - ts::flag equality comparison.
operator==(type_safe::flag, type_safe::flag) - ts::flag equality comparison.
operator==(type_safe::noflag_t, const flag_set<Enum> &) - flag_set
equality comparison.
operator==(type_safe::nullopt_t, const basic_optional<StoragePolicy> &)
operator==(type_safe::nullvar_t, const basic_variant<VariantPolicy, Head, Types...> &)
operator>(const T &, const basic_variant<VariantPolicy, Head, Types...> &)
operator>(const U &, const basic_optional<StoragePolicy> &) - Compares a ts::basic_optional with a value.
operator>(const basic_optional<StoragePolicy> &, const U &) - Compares a ts::basic_optional with a value.
operator>(const basic_optional<StoragePolicy> &, const basic_optional<StoragePolicy> &) - Compares two ts::basic_optional objects.
operator>(const basic_optional<StoragePolicy> &, type_safe::nullopt_t)
operator>(const basic_variant<VariantPolicy, Head, Types...> &, const T &)
operator>(const basic_variant<VariantPolicy, Head, Types...> &, type_safe::nullvar_t)
operator>(const constrained_type<T, Constraint, Verifier> &, const constrained_type<T, Constraint, Verifier> &) - Compares a ts::constrained_type.
operator>(const floating_point<A> &, const floating_point<B> &)
operator>(const integer<A, Policy> &, const integer<B, Policy> &)
operator>(type_safe::nullopt_t, const basic_optional<StoragePolicy> &)
operator>(type_safe::nullvar_t, const basic_variant<VariantPolicy, Head, Types...> &)
operator>=(const T &, const basic_variant<VariantPolicy, Head, Types...> &)
operator>=(const U &, const basic_optional<StoragePolicy> &) - Compares a ts::basic_optional with a value.
operator>=(const basic_optional<StoragePolicy> &, const U &) - Compares a ts::basic_optional with a value.
operator>=(const basic_optional<StoragePolicy> &, const basic_optional<StoragePolicy> &) - Compares two ts::basic_optional objects.
operator>=(const basic_optional<StoragePolicy> &, type_safe::nullopt_t)
operator>=(const basic_variant<VariantPolicy, Head, Types...> &, const T &)
operator>=(const basic_variant<VariantPolicy, Head, Types...> &, type_safe::nullvar_t)
operator>=(const constrained_type<T, Constraint, Verifier> &, const constrained_type<T, Constraint, Verifier> &) - Compares a ts::constrained_type.
operator>=(const floating_point<A> &, const floating_point<B> &)
operator>=(const integer<A, Policy> &, const integer<B, Policy> &)
operator>=(type_safe::nullopt_t, const basic_optional<StoragePolicy> &)
operator>=(type_safe::nullvar_t, const basic_variant<VariantPolicy, Head, Types...> &)
operator>>(std::basic_istream<Char, CharTraits> &, floating_point<FloatT> &)
operator>>(std::basic_istream<Char, CharTraits> &, integer<IntegerT, Policy> &)
operator>>(std::basic_istream<Char, CharTraits> &, type_safe::boolean &) - ts::boolean input operator.
optional - A ts::basic_optional that uses ts::direct_optional_storage<T>.
optional_for - Uses ts::optional_storage_policy_for to select the appropriate ts::basic_optional.
optional_ref - A ts::basic_optional that uses ts::reference_optional_storage. It is an optional reference.
optional_storage_policy_for<T&&> - Specialization of ts::optional_storage_policy_for for rvalue references.
optional_storage_policy_for<T&> - Specialization of ts::optional_storage_policy_for for lvalue references.
optional_storage_policy_for - Selects the storage policy used when rebinding a ts::basic_optional.
optional_storage_policy_for<basic_optional<StoragePolicy>> - Specialization of ts::optional_storage_policy_for for ts::basic_optional itself.
optional_storage_policy_for<object_ref<T, XValue>> - Sets the ts::basic_optional storage policy for ts::object_ref to ts::reference_optional_storage.
optional_variant_policy - A variant policy for ts::basic_variant that creates a variant with explicit empty state.
optional_xvalue_ref - A ts::basic_optional that uses ts::reference_optional_storage with XValue
being true
. It is an optional reference to an xvalue, i.e. an lvalue that can be moved from, like returned by std::move()
. \notes T
is the type without the reference, i.e. optional_xvalue_ref<int>
. \module optional
output_parameter - A tiny wrapper modelling an output parameter of a function.
prev(const type_safe::index_t &, const type_safe::difference_t &)
rarely_empty_variant_policy - A variant policy for ts::basic_variant that creates a variant which is rarely empty.
ref(T &) - Creates a (const) ts::object_ref.
ref(T (&)[Size]) - Creates a ts::array_ref.
ref(T *, T *) - Creates a ts::array_ref.
ref(T *, size_t) - Creates a ts::array_ref.
reference_optional_storage - A StoragePolicy
for ts::basic_optional that allows optional references.
sanitize(T &&, Constraint) - Creates a ts::constrained_type using the ts::throwing_verifier.
sanitize_bounded(T &&, U1 &&, U2 &&) - Creates a ts::bounded_type to a specified ts::constraints::closed_interval.
sanitize_bounded_exclusive(T &&, U1 &&, U2 &&) - Creates a ts::bounded_type to a specified ts::constraints::open_interval, using ts::throwing_verifier.
strong_typedef - A strong typedef emulation.
tag(T &&, Constraint) - Creates a new ts::tagged_type.
tagged_ref - An alias for ts::tagged_type with reference.
tagged_type - An alias for ts::constrained_type that never checks the constraint.
tagged_union - A tagged union.
throwing_verifier - A Verifier
for ts::constrained_type that throws an exception in case of failure.
undefined_behavior_arithmetic - An ArithmeticPolicy
where under/overflow is always undefined behavior, albeit checked when assertions are enabled.
underlying_type - The underlying type of the ts::strong_typedef.
union_type - Tag type so no explicit template instantiation of function parameters is required.
union_types - Very basic typelist.
variant - A ts::basic_variant with the recommended default semantics.
variant_type - Convenience alias for ts::union_type.
variant_types - Convenience alias for ts::union_types.
visit(Visitor &&, Optionals &&...) - Visits a ts::basic_optional.
visit(Visitor &&, Variants &&...) - Visits a ts::basic_variant.
with(Optional &&, Func &&, Args &&...) - With operation for ts::optional.
with(basic_variant<VariantPolicy, Head, Types...> &&, Func &&, Args &&...)
with(basic_variant<VariantPolicy, Head, Types...> &, Func &&, Args &&...)
with(const array_ref<T, XValue> &, Func &&, Args &&...) - With operation for ts::array_ref.
with(const basic_variant<VariantPolicy, Head, Types...> &&, Func &&, Args &&...)
with(const basic_variant<VariantPolicy, Head, Types...> &, Func &&, Args &&...)
with(const object_ref<T, XValue> &, Func &&, Args &&...) - With operation for ts::object_ref.
with(constrained_type<T, Constraint, Verifier> &, Func &&, Args &&...) - With operation for ts::constrained_type.
xref(T &) - Creates a ts::xvalue_ref.
xref(T (&)[Size]) - Creates a ts::array_xvalue_ref.
xref(T *, T *) - Creates a ts::array_xvalue_ref.
xref(T *, size_t) - Creates a ts::array_xvalue_ref.
xvalue_ref - Convenience alias of ts::object_ref where XValue
is true
.
type_safe::constraints
bounded - A Constraint
for the ts::constrained_type.
closed - Tag objects to specify bounds for ts::constraints::bounded.
closed_interval - A Constraint
for the ts::constrained_type.
dynamic_bound - Tag type to enable a dynamic bound.
greater - A Constraint
for the ts::constrained_type.
greater_equal - A Constraint
for the ts::constrained_type.
less - A Constraint
for the ts::constrained_type.
less_equal - A Constraint
for the ts::constrained_type.
non_default - A Constraint
for the ts::constrained_type.
non_empty - A Constraint
for the ts::constrained_type.
non_invalid - A Constraint
for the ts::constrained_type.
non_null - A Constraint
for the ts::constrained_type.
open - Tag objects to specify bounds for ts::constraints::bounded.
open_interval - A Constraint
for the ts::constrained_type.
owner - A Constraint
for the ts::tagged_type.
type_safe::detail
type_safe::literals
operator""_bound() - Creates a static bound for ts::bounded_type.
operator""_boundu() - Creates a static bound for ts::bounded_type.
type_safe::strong_typedef_op
- Some operations for ts::strong_typedef.
type_safe::types
type_safe::types::literals